﻿package mortal.game.view.guild.buildingPanel
{
    import com.gengine.core.*;
    import flash.display.*;
    import flash.events.*;
    import mortal.common.*;
    import mortal.component.window.*;
    import mortal.mvc.interfaces.*;

    public class GuildBuildingBasePanel extends BaseWindow implements IGuildPanel
    {
        protected var _isLoadComplete:Boolean = false;
        protected var _uiRes:String;

        public function GuildBuildingBasePanel(param1:ILayer = null)
        {
            super(param1);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.layoutUI();
            this.configEventListener(MouseEvent.CLICK, this.onMouseClick);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this.quickDispose();
            return;
        }// end function

        override protected function setWindowCenter() : void
        {
            return;
        }// end function

        public function layoutUI() : void
        {
            return;
        }// end function

        public function onMouseClick(event:MouseEvent) : void
        {
            return;
        }// end function

        public function update() : void
        {
            return;
        }// end function

        public function quickDispose() : void
        {
            this.disposeAllChild(contentSprite);
            this.disposeAllChild(contentTopOf3DSprite);
            removeEventListener(MouseEvent.CLICK, this.onMouseClick);
            return;
        }// end function

        private function disposeAllChild(param1:DisplayObjectContainer) : void
        {
            var _loc_3:DisplayObject = null;
            var _loc_2:* = param1.numChildren;
            while (_loc_2 > 0)
            {
                
                _loc_3 = param1.getChildAt(0);
                if (_loc_3 is IDispose)
                {
                    (_loc_3 as IDispose).dispose(true);
                    _loc_3 = null;
                }
                else
                {
                    DisplayUtil.removeMe(_loc_3);
                }
                _loc_2 = _loc_2 - 1;
            }
            return;
        }// end function

    }
}
